//
//  SC_BarChartPlotView.h
//  SCCharts
//
//  Created by Yang on 9/9/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "SC_IndicatorView.h"


@protocol SC_BarChartPlotViewDelegate

- (void)plotViewSizeChangedTo:(CGSize )size;

@end


@interface SC_BarChartPlotView : UIView {
	NSMutableArray *dataArray;
	NSInteger numberOfColumn;
	
	float maxValue;
	
	id <SC_BarChartPlotViewDelegate> delegate;
	
	SC_IndicatorView *indicator;

}
@property(nonatomic,retain)id <SC_BarChartPlotViewDelegate> delegate;



- (void)setData:(NSArray *)data;

- (void)calculateDataValues;

//- (float )marginHeightWithScrollView;

// Drawing methods
- (void)drawXAxisLabels:(CGContextRef)context;
- (void)drawBars:(CGContextRef )context;
- (void)drawBar:(CGContextRef )context atPoint:(CGPoint )point withPara:(NSDictionary *)para;
- (void)drawTitle:(CGContextRef )context atPoint:(CGPoint )point withTitle:(NSString *)string;

// coordination transfer methods
- (float )yForValue:(float )value;
- (float )valueForY:(float )y;

// for show indicator
- (void)showIndicatorForTapPoint:(CGPoint )point;
- (void)resetIndicator;

@end
